Variable Reference
Variable Reference Guide
In workflow configurations (such as system prompts, tool parameters, conditional logic, etc.), you can use placeholders in the format {{namespace.key}} or {{key}} to dynamically reference runtime data.
Core Namespaces
| Namespace | Description | Example |
|---|---|---|
sys (or system) | System-level variables, such as query content, session ID, time, etc. | {{sys.query}}, {{sys.now}} |
var (or variable) | Custom flow variables, usually generated by nodes or set manually. | {{var.orderId}} |
node | References the output result of a specific node. | {{node.node_123}} |
customer | Customer information associated with the current session. | {{customer.name}} |
entity | Entities extracted by intent recognition or extraction nodes. | {{entity.product}} |
event | Data carried when the workflow is triggered by a webhook or external event. | {{event.order_id}} |
meta | Session Metadata. | {{meta.vip_level}} |
agent | Agent-specific variables. | {{agent.sysPrompt}} |
Variable Details
1. System Variables (sys / system)
| Variable Name | Alias | Description |
|---|---|---|
query | input, usermessage | The user's current input message. |
lastOutput | previousOutput | The output result of the previous execution node. |
intent | - | The currently identified user intent. |
intentConfidence | - | Confidence score of intent recognition (0.00 - 1.00). |
sessionId | - | Current Session ID. |
customerId | - | Current Customer ID. |
now | date, currentDate | Current date (yyyy-MM-dd). |
nowTime | - | Current time (yyyy-MM-dd HH:mm). |
finalReply | - | The final generated reply content. |
needHumanTransfer | - | Whether marked for transfer to human agent (true/false). |
humanTransferReason | - | Reason for transfer to human agent. |
2. Node Output (node)
References the execution result of a specific node.
- Syntax:
{{node.NODE_ID}} - Example:
{{node.llm_generation_1}} - Note:
NODE_IDis the unique ID generated when you configure the node on the canvas.
3. Customer Info (customer)
References detailed information about the current chat customer.
- Syntax:
{{customer.FIELD_NAME}} - Common Fields:
{{customer.name}}{{customer.email}}{{customer.phone}}{{customer.id}}
4. Entity (entity)
References key entities extracted from user input.
- Syntax:
{{entity.ENTITY_NAME}} - Example: If intent recognition extracted
productName, use{{entity.productName}}.
5. Event Data (event)
References data in the event payload when the workflow is triggered by an external event (e.g., Shopify Webhook).
- Syntax:
{{event.JSON_FIELD}} - Example:
{{event.order_id}},{{event.total_price}}
6. Shorthand Mode (No Namespace)
If the namespace is omitted (e.g., using {{key}} directly), the system will automatically search for variables in the following priority order:
- Local Variables
- System Variables (
sys) - Custom Variables (
var) - Entities (
entity) - Customer Info (
customer) - Node Output (
node)
Recommendation: To avoid ambiguity, it is recommended to use the full notation with namespaces (e.g.,
{{sys.query}}) whenever possible.